#include <iostream>
#include <stdlib.h>

using namespace std;

int abc(int a,int b,int c);

int main ()
{
    int a,b,c;
    cin>>a>>b>>c;
 
    try{cout<<abc(a,b,c)<<endl;}
    catch(int c)
    {cout<<"error is present  "<<c<<endl;}

    system("pause");
    return 0;
}

int abc(int a,int b,int c)
{
    if(a<0&&b<0&&c<0) 
        throw 1;
    else if(a==0&&b==0&&c==0)
        throw 2;
        
    return a+b*c;
}